#include<iostream>
#include<fstream>
#include<string>
#include<algorithm>
#include<iterator>
using namespace std;
int main()
{
	int a[4] = {1,2,3,4};
	My_ostream_iterator<int>oit(cout," * ");
	copy(a,a+4,oit);
	ofstream oFile("test.txt",ios::out);
	My_ostream_iterator<int>oitf(oFile," * ");
	copy(a,a+4,oitf);
	oFile.close();
	return ;
}